1. Technical Field
The present invention relates to a message processing system and method using an external storage medium.
2. Related Art
Describing message processing in a communication program, a linked list is a structure that is used when data is divided into several messages in which their number is dynamically added instead of being fixed. In such a structure, a message indicates a next message, and when a new message is added, the last message of existing messages indicates the new message.
However, in a communication program with a difference in message receiving and processing rates, if one message is received and processed before reading a next message, performance deteriorates.
Therefore, in order to improve performance, a message addition thread is separated from a message processing thread, with a buffer mediating between the message addition and processing threads. The processing thread processes messages by periodically examining whether or not the buffer contains a message therein.
However, if messages are accumulated in the buffer for a long period of time, the process does not operate due to memory shortage so that, upon having added a predetermined quantity of messages, the message addition thread discards a message instead of adding it to the buffer, or records it as a file for processing it later.
That is, conventionally, it has been required to determine the number of messages to be stored in the buffer beforehand in order to determine whether a message to be added by the thread should be added to memory of the buffer or to an external storage.
Furthermore, conditions as to whether the message-processing thread has read a message from the memory or has processed a message written in the external storage should have been realized by developers who make the thread that adds the message instead of the buffer.
Also, the message processing thread should have determined whether or not a message exists in the external storage in addition to the buffer before reading and processing the message, if any. The function of bringing a file name written in external storage should have been realized separately.
Moreover, there is a drawback in that the function of using the external storage is realized in the processing thread which uses the buffer such that the same function is not easily reused by another system.